package com.itheima.pinda.mapstruct;

import com.itheima.pinda.DTO.user.TruckDriverDto;
import com.itheima.pinda.DTO.user.TruckDriverLicenseDto;
import com.itheima.pinda.entity.user.PdTruckDriver;
import com.itheima.pinda.entity.user.PdTruckDriverLicense;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;

/**
 * @author llhuang10
 * @date 2021/9/30 17:01
 */
@Mapper(builder = @Builder(disableBuilder = true), uses = {MyStringLongMapper.class})
public interface TruckDriverDTO2Entity {


    /**
     * 司机表 Entity <--> DTO
     */
    TruckDriverDto conver(PdTruckDriver pdTruckDriver);

    PdTruckDriver conver(TruckDriverDto truckDriverDto);

    /**
     * 司机驾驶证信息表 Entity <--> DTO
     */
    TruckDriverLicenseDto conver(PdTruckDriverLicense truckDriverLicense);

    PdTruckDriverLicense conver(TruckDriverLicenseDto truckDriverLicenseDto);
}
